<template>
  <div class="header">
    <div class="new">
      <span class="iconfont iconnew"></span>
    </div>
    <div class="search" @click="handleClick">
      <span class="iconfont iconsearch"></span>
      <span class="text">搜索新闻</span>
    </div>
    <div class="user" @click="$router.push({path:'/personal'})">
      <span class="iconfont iconwode"></span>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    handleClick() {
      // console.log("跳转到搜索页面");
      this.$router.push({
        path: "/search"
      });
    }
  }
};
</script>

<style lang='less'>
.header {
  display: flex;
  justify-content: space-between;
  background-color: #ff0000;
  .new {
    .iconnew {
      padding-left: 2.778vw;
      font-size: 13.889vw;
      color: #fff;
    }
  }
  .search {
    position: relative;
    width: 61.111vw;
    height: 9.722vw;
    border-radius: 5vw;
    margin-top: 2.778vw;
    background-color: #f97979;
    .iconsearch {
      position: absolute;
      top: 2.222vw;
      left: 17.222vw;
      font-size: 5.556vw;
      color: #fff;
    }
    .text {
      position: absolute;
      top: 2.222vw;
      right: 18.333vw;
      color: #fff;
    }
  }
  .user {
    margin: 0;
    padding-top: 3.333vw;
    .iconwode {
      font-size: 7.778vw;
      color: #fff;
      padding-right: 5vw;
    }
  }
}
</style>